package com.fujin.gulimall.gulimall.auth.feign;

import com.fujin.common.Vo.SocialUser;
import com.fujin.common.utils.R;
import com.fujin.gulimall.gulimall.auth.Vo.UserLoginVo;
import com.fujin.gulimall.gulimall.auth.Vo.UserRegisterVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @title: MemBerFeign
 * @Author uIn
 * @Date: 2022/2/26 11:53
 * @Version 1.0
 */
@FeignClient("gulimall-member")
public interface MemBerFeign {

    /**
     * 远程会员注册功能
     * @param registerVo
     * @return
     */
    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegisterVo registerVo);

    /**
     * 远程会员登录功能
     * @param loginVo
     * @return
     */
    @PostMapping("/member/member/login")
    public R login(@RequestBody UserLoginVo loginVo);

    /**
     * 远程微博社交登录
     * 根据uid判断用户是否第一次登录
     * 第一次登录的话为注册、不是第一次就直接登录
     * @param socialUser
     * @return
     */
    @PostMapping("/member/member/auth/login")
    R login(@RequestBody SocialUser socialUser);

}
